package org.jsbd.boss.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jsbd.boss.common.DataGridModel;
import org.jsbd.boss.dao.IReaderStatisticsDAO;
import org.jsbd.boss.domian.channel.ReaderStatisticsDto;
import org.jsbd.boss.domian.channel.ReaderStatisticsVO;
import org.springframework.stereotype.Repository;

@Repository("readerStatisticsDao")
public class ReaderStatisticsDAOImpl extends CrackStatisticsBaseDao implements IReaderStatisticsDAO {

	@Override
	public Integer getMonthNum(ReaderStatisticsVO rsVO) {
		return  (Integer) super.queryForObject("qy_reader_statistics.SELECT_MONTH_NUM", rsVO);
	}
	
	@Override
	public List<String> selectXAxis(String date) {
		return super.queryForList("qy_reader_statistics.SELECT_X_AXIS", date);
	}

	@Override
	public List<ReaderStatisticsDto> selectYAxis(ReaderStatisticsVO rsVO) {
		return super.queryForList("qy_reader_statistics.SELECT_Y_AXIS", rsVO);
	}

	@Override
	public Map<String, Object> findDataWithPage(DataGridModel page) {
		Map<String, Object> results = new HashMap<String, Object>();
	    results.put("total", 24);
	    results.put("rows", super.queryForList("qy_reader_statistics.SELECT_Y_AXIS", page));
	    return results;
	}

	
	
}
